Termination of the following Term Rewriting System could be proven:

Context-sensitive rewrite system:
The TRS R consists of the following rules:

U11(tt, N) → N
U21(tt, M, N) → s(plus(N, M))
U31(tt) → 0
U41(tt, M, N) → plus(x(N, M), N)
and(tt, X) → X
isNat(0) → tt
isNat(plus(V1, V2)) → and(isNat(V1), isNat(V2))
isNat(s(V1)) → isNat(V1)
isNat(x(V1, V2)) → and(isNat(V1), isNat(V2))
plus(N, 0) → U11(isNat(N), N)
plus(N, s(M)) → U21(and(isNat(M), isNat(N)), M, N)
x(N, 0) → U31(isNat(N))
x(N, s(M)) → U41(and(isNat(M), isNat(N)), M, N)

The replacement map contains the following entries:

U11: {1}
tt: empty set
U21: {1}
s: {1}
plus: {1, 2}
U31: {1}
0: empty set
U41: {1}
x: {1, 2}
and: {1}
isNat: empty set


CSR
  ↳ CSDependencyPairsProof

Context-sensitive rewrite system:
The TRS R consists of the following rules:

U11(tt, N) → N
U21(tt, M, N) → s(plus(N, M))
U31(tt) → 0
U41(tt, M, N) → plus(x(N, M), N)
and(tt, X) → X
isNat(0) → tt
isNat(plus(V1, V2)) → and(isNat(V1), isNat(V2))
isNat(s(V1)) → isNat(V1)
isNat(x(V1, V2)) → and(isNat(V1), isNat(V2))
plus(N, 0) → U11(isNat(N), N)
plus(N, s(M)) → U21(and(isNat(M), isNat(N)), M, N)
x(N, 0) → U31(isNat(N))
x(N, s(M)) → U41(and(isNat(M), isNat(N)), M, N)

The replacement map contains the following entries:

U11: {1}
tt: empty set
U21: {1}
s: {1}
plus: {1, 2}
U31: {1}
0: empty set
U41: {1}
x: {1, 2}
and: {1}
isNat: empty set

Using Improved CS-DPs we result in the following initial Q-CSDP problem.

↳ CSR
  ↳ CSDependencyPairsProof
QCSDP
      ↳ QCSDependencyGraphProof

Q-restricted context-sensitive dependency pair problem:
The symbols in {s, plus, U31, x, PLUS, X, U311} are replacing on all positions.
For all symbols f in {U11, U21, U41, and, U211, U411, AND, U111} we have µ(f) = {1}.
The symbols in {isNat, ISNAT, U} are not replacing on any position.

The ordinary context-sensitive dependency pairs DPo are:

U211(tt, M, N) → PLUS(N, M)
U411(tt, M, N) → PLUS(x(N, M), N)
U411(tt, M, N) → X(N, M)
ISNAT(plus(V1, V2)) → AND(isNat(V1), isNat(V2))
ISNAT(plus(V1, V2)) → ISNAT(V1)
ISNAT(s(V1)) → ISNAT(V1)
ISNAT(x(V1, V2)) → AND(isNat(V1), isNat(V2))
ISNAT(x(V1, V2)) → ISNAT(V1)
PLUS(N, 0) → U111(isNat(N), N)
PLUS(N, 0) → ISNAT(N)
PLUS(N, s(M)) → U211(and(isNat(M), isNat(N)), M, N)
PLUS(N, s(M)) → AND(isNat(M), isNat(N))
PLUS(N, s(M)) → ISNAT(M)
X(N, 0) → U311(isNat(N))
X(N, 0) → ISNAT(N)
X(N, s(M)) → U411(and(isNat(M), isNat(N)), M, N)
X(N, s(M)) → AND(isNat(M), isNat(N))
X(N, s(M)) → ISNAT(M)

The collapsing dependency pairs are DPc:

U111(tt, N) → N
U211(tt, M, N) → N
U211(tt, M, N) → M
U411(tt, M, N) → N
U411(tt, M, N) → M
AND(tt, X) → X


The hidden terms of R are:

isNat(V2)

Every hiding context is built from:none

Hence, the new unhiding pairs DPu are :

U111(tt, N) → U(N)
U211(tt, M, N) → U(N)
U211(tt, M, N) → U(M)
U411(tt, M, N) → U(N)
U411(tt, M, N) → U(M)
AND(tt, X) → U(X)
U(isNat(V2)) → ISNAT(V2)

The TRS R consists of the following rules:

U11(tt, N) → N
U21(tt, M, N) → s(plus(N, M))
U31(tt) → 0
U41(tt, M, N) → plus(x(N, M), N)
and(tt, X) → X
isNat(0) → tt
isNat(plus(V1, V2)) → and(isNat(V1), isNat(V2))
isNat(s(V1)) → isNat(V1)
isNat(x(V1, V2)) → and(isNat(V1), isNat(V2))
plus(N, 0) → U11(isNat(N), N)
plus(N, s(M)) → U21(and(isNat(M), isNat(N)), M, N)
x(N, 0) → U31(isNat(N))
x(N, s(M)) → U41(and(isNat(M), isNat(N)), M, N)

Q is empty.

The approximation of the Context-Sensitive Dependency Graph contains 3 SCCs with 14 less nodes.


↳ CSR
  ↳ CSDependencyPairsProof
    ↳ QCSDP
      ↳ QCSDependencyGraphProof
        ↳ AND
QCSDP
            ↳ QCSDPReductionPairProof
          ↳ QCSDP
          ↳ QCSDP

Q-restricted context-sensitive dependency pair problem:
The symbols in {s, plus, U31, x} are replacing on all positions.
For all symbols f in {U11, U21, U41, and, AND} we have µ(f) = {1}.
The symbols in {isNat, U, ISNAT} are not replacing on any position.

The TRS P consists of the following rules:

AND(tt, X) → U(X)
U(isNat(V2)) → ISNAT(V2)
ISNAT(plus(V1, V2)) → AND(isNat(V1), isNat(V2))
ISNAT(plus(V1, V2)) → ISNAT(V1)
ISNAT(s(V1)) → ISNAT(V1)
ISNAT(x(V1, V2)) → AND(isNat(V1), isNat(V2))
ISNAT(x(V1, V2)) → ISNAT(V1)

The TRS R consists of the following rules:

U11(tt, N) → N
U21(tt, M, N) → s(plus(N, M))
U31(tt) → 0
U41(tt, M, N) → plus(x(N, M), N)
and(tt, X) → X
isNat(0) → tt
isNat(plus(V1, V2)) → and(isNat(V1), isNat(V2))
isNat(s(V1)) → isNat(V1)
isNat(x(V1, V2)) → and(isNat(V1), isNat(V2))
plus(N, 0) → U11(isNat(N), N)
plus(N, s(M)) → U21(and(isNat(M), isNat(N)), M, N)
x(N, 0) → U31(isNat(N))
x(N, s(M)) → U41(and(isNat(M), isNat(N)), M, N)

Q is empty.

Using the order
Recursive path order with status [2].
Quasi-Precedence:
[x2, U413] > [plus2, U213] > [isNat1, and2] > tt > [AND2, U1] > s1
[x2, U413] > [plus2, U213] > [isNat1, and2] > tt > 0 > s1
[x2, U413] > [plus2, U213] > [isNat1, and2] > ISNAT1 > [AND2, U1] > s1
[x2, U413] > [plus2, U213] > U112 > s1
[x2, U413] > U311 > 0 > s1

Status:
plus2: [2,1]
U413: [2,3,1]
x2: [2,1]
U112: multiset
and2: [2,1]
0: multiset
ISNAT1: multiset
tt: multiset
U311: multiset
U1: multiset
AND2: multiset
s1: multiset
isNat1: multiset
U213: [2,3,1]


the following usable rules

isNat(0) → tt
isNat(plus(V1, V2)) → and(isNat(V1), isNat(V2))
isNat(s(V1)) → isNat(V1)
isNat(x(V1, V2)) → and(isNat(V1), isNat(V2))
plus(N, 0) → U11(isNat(N), N)
plus(N, s(M)) → U21(and(isNat(M), isNat(N)), M, N)
U11(tt, N) → N
U21(tt, M, N) → s(plus(N, M))
and(tt, X) → X
x(N, 0) → U31(isNat(N))
x(N, s(M)) → U41(and(isNat(M), isNat(N)), M, N)
U31(tt) → 0
U41(tt, M, N) → plus(x(N, M), N)

could all be oriented weakly.
Furthermore, the pairs

AND(tt, X) → U(X)
U(isNat(V2)) → ISNAT(V2)
ISNAT(plus(V1, V2)) → AND(isNat(V1), isNat(V2))
ISNAT(plus(V1, V2)) → ISNAT(V1)
ISNAT(s(V1)) → ISNAT(V1)
ISNAT(x(V1, V2)) → AND(isNat(V1), isNat(V2))
ISNAT(x(V1, V2)) → ISNAT(V1)

could be oriented strictly and thus removed.
All pairs have been removed.


↳ CSR
  ↳ CSDependencyPairsProof
    ↳ QCSDP
      ↳ QCSDependencyGraphProof
        ↳ AND
          ↳ QCSDP
            ↳ QCSDPReductionPairProof
QCSDP
                ↳ PIsEmptyProof
          ↳ QCSDP
          ↳ QCSDP

Q-restricted context-sensitive dependency pair problem:
The symbols in {s, plus, U31, x} are replacing on all positions.
For all symbols f in {U11, U21, U41, and} we have µ(f) = {1}.
The symbols in {isNat} are not replacing on any position.

The TRS P consists of the following rules:
none

The TRS R consists of the following rules:

U11(tt, N) → N
U21(tt, M, N) → s(plus(N, M))
U31(tt) → 0
U41(tt, M, N) → plus(x(N, M), N)
and(tt, X) → X
isNat(0) → tt
isNat(plus(V1, V2)) → and(isNat(V1), isNat(V2))
isNat(s(V1)) → isNat(V1)
isNat(x(V1, V2)) → and(isNat(V1), isNat(V2))
plus(N, 0) → U11(isNat(N), N)
plus(N, s(M)) → U21(and(isNat(M), isNat(N)), M, N)
x(N, 0) → U31(isNat(N))
x(N, s(M)) → U41(and(isNat(M), isNat(N)), M, N)

Q is empty.

The TRS P is empty. Hence, there is no (P,Q,R,µ)-chain.

↳ CSR
  ↳ CSDependencyPairsProof
    ↳ QCSDP
      ↳ QCSDependencyGraphProof
        ↳ AND
          ↳ QCSDP
QCSDP
            ↳ QCSDPSubtermProof
          ↳ QCSDP

Q-restricted context-sensitive dependency pair problem:
The symbols in {s, plus, U31, x, PLUS} are replacing on all positions.
For all symbols f in {U11, U21, U41, and, U211} we have µ(f) = {1}.
The symbols in {isNat} are not replacing on any position.

The TRS P consists of the following rules:

PLUS(N, s(M)) → U211(and(isNat(M), isNat(N)), M, N)
U211(tt, M, N) → PLUS(N, M)

The TRS R consists of the following rules:

U11(tt, N) → N
U21(tt, M, N) → s(plus(N, M))
U31(tt) → 0
U41(tt, M, N) → plus(x(N, M), N)
and(tt, X) → X
isNat(0) → tt
isNat(plus(V1, V2)) → and(isNat(V1), isNat(V2))
isNat(s(V1)) → isNat(V1)
isNat(x(V1, V2)) → and(isNat(V1), isNat(V2))
plus(N, 0) → U11(isNat(N), N)
plus(N, s(M)) → U21(and(isNat(M), isNat(N)), M, N)
x(N, 0) → U31(isNat(N))
x(N, s(M)) → U41(and(isNat(M), isNat(N)), M, N)

Q is empty.

We use the subterm processor [20].


The following pairs can be oriented strictly and are deleted.


PLUS(N, s(M)) → U211(and(isNat(M), isNat(N)), M, N)
The remaining pairs can at least be oriented weakly.

U211(tt, M, N) → PLUS(N, M)
Used ordering: Combined order from the following AFS and order.
U211(x1, x2, x3)  =  x2
PLUS(x1, x2)  =  x2

Subterm Order


↳ CSR
  ↳ CSDependencyPairsProof
    ↳ QCSDP
      ↳ QCSDependencyGraphProof
        ↳ AND
          ↳ QCSDP
          ↳ QCSDP
            ↳ QCSDPSubtermProof
QCSDP
                ↳ QCSDependencyGraphProof
          ↳ QCSDP

Q-restricted context-sensitive dependency pair problem:
The symbols in {s, plus, U31, x, PLUS} are replacing on all positions.
For all symbols f in {U11, U21, U41, and, U211} we have µ(f) = {1}.
The symbols in {isNat} are not replacing on any position.

The TRS P consists of the following rules:

U211(tt, M, N) → PLUS(N, M)

The TRS R consists of the following rules:

U11(tt, N) → N
U21(tt, M, N) → s(plus(N, M))
U31(tt) → 0
U41(tt, M, N) → plus(x(N, M), N)
and(tt, X) → X
isNat(0) → tt
isNat(plus(V1, V2)) → and(isNat(V1), isNat(V2))
isNat(s(V1)) → isNat(V1)
isNat(x(V1, V2)) → and(isNat(V1), isNat(V2))
plus(N, 0) → U11(isNat(N), N)
plus(N, s(M)) → U21(and(isNat(M), isNat(N)), M, N)
x(N, 0) → U31(isNat(N))
x(N, s(M)) → U41(and(isNat(M), isNat(N)), M, N)

Q is empty.

The approximation of the Context-Sensitive Dependency Graph contains 0 SCCs.


↳ CSR
  ↳ CSDependencyPairsProof
    ↳ QCSDP
      ↳ QCSDependencyGraphProof
        ↳ AND
          ↳ QCSDP
          ↳ QCSDP
QCSDP
            ↳ QCSDPSubtermProof

Q-restricted context-sensitive dependency pair problem:
The symbols in {s, plus, U31, x, X} are replacing on all positions.
For all symbols f in {U11, U21, U41, and, U411} we have µ(f) = {1}.
The symbols in {isNat} are not replacing on any position.

The TRS P consists of the following rules:

U411(tt, M, N) → X(N, M)
X(N, s(M)) → U411(and(isNat(M), isNat(N)), M, N)

The TRS R consists of the following rules:

U11(tt, N) → N
U21(tt, M, N) → s(plus(N, M))
U31(tt) → 0
U41(tt, M, N) → plus(x(N, M), N)
and(tt, X) → X
isNat(0) → tt
isNat(plus(V1, V2)) → and(isNat(V1), isNat(V2))
isNat(s(V1)) → isNat(V1)
isNat(x(V1, V2)) → and(isNat(V1), isNat(V2))
plus(N, 0) → U11(isNat(N), N)
plus(N, s(M)) → U21(and(isNat(M), isNat(N)), M, N)
x(N, 0) → U31(isNat(N))
x(N, s(M)) → U41(and(isNat(M), isNat(N)), M, N)

Q is empty.

We use the subterm processor [20].


The following pairs can be oriented strictly and are deleted.


X(N, s(M)) → U411(and(isNat(M), isNat(N)), M, N)
The remaining pairs can at least be oriented weakly.

U411(tt, M, N) → X(N, M)
Used ordering: Combined order from the following AFS and order.
X(x1, x2)  =  x2
U411(x1, x2, x3)  =  x2

Subterm Order


↳ CSR
  ↳ CSDependencyPairsProof
    ↳ QCSDP
      ↳ QCSDependencyGraphProof
        ↳ AND
          ↳ QCSDP
          ↳ QCSDP
          ↳ QCSDP
            ↳ QCSDPSubtermProof
QCSDP
                ↳ QCSDependencyGraphProof

Q-restricted context-sensitive dependency pair problem:
The symbols in {s, plus, U31, x, X} are replacing on all positions.
For all symbols f in {U11, U21, U41, and, U411} we have µ(f) = {1}.
The symbols in {isNat} are not replacing on any position.

The TRS P consists of the following rules:

U411(tt, M, N) → X(N, M)

The TRS R consists of the following rules:

U11(tt, N) → N
U21(tt, M, N) → s(plus(N, M))
U31(tt) → 0
U41(tt, M, N) → plus(x(N, M), N)
and(tt, X) → X
isNat(0) → tt
isNat(plus(V1, V2)) → and(isNat(V1), isNat(V2))
isNat(s(V1)) → isNat(V1)
isNat(x(V1, V2)) → and(isNat(V1), isNat(V2))
plus(N, 0) → U11(isNat(N), N)
plus(N, s(M)) → U21(and(isNat(M), isNat(N)), M, N)
x(N, 0) → U31(isNat(N))
x(N, s(M)) → U41(and(isNat(M), isNat(N)), M, N)

Q is empty.

The approximation of the Context-Sensitive Dependency Graph contains 0 SCCs.